import request from '@/utils/request'

// 查询【根据创建人查询】列表
export function listResume(query) {
  return request({
    url: '/system/resume/list',
    method: 'get',
    params: query
  })
}


// 查询【请填写功能名称】详细
export function getResume(resumeId) {
  return request({
    url: '/system/resume/' + resumeId,
    method: 'get'
  })
}

// 查询文件名称
export function getListFiles(resumeIds) {
  return request({
    url: '/system/resume/listFiles/' + resumeIds,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addResume(data) {
  return request({
    url: '/system/resume',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateResume(data) {
  return request({
    url: '/system/resume',
    method: 'put',
    data: data
  })
}

// 假删除【请填写功能名称】
export function delResume(resumeId) {
  return request({
    url: '/system/resume/' + resumeId + "/1",
    method: 'delete'
  })
}

/*简历的岗位展示*/
export function listStation(query) {
  return request({
    url: '/system/station/listResume',
    method: 'get',
    params: query
  })
}

/*推送添加*/
export function addAuit(resumeIds, stationId) {
  return request({
    url: '/system/auitvo/' + resumeIds + "/" + stationId,
    method: 'post'
  })

}

/*文件上传*/
export function uploadFile2(data) {
  return request({
    url: '/system/files/uploadFile2',
    method: 'post',
    data: data
  })
}

/*文件下载*/
export function logNameReqs(ids) {
  return request({
    url: '/system/files/downloads/' + ids,
    method: 'get',
    responseType: 'blob'
  })
}

/*文件解析上传*/
export function uploadFile(data) {
  return request({
    url: '/system/files/uploadFile',
    method: 'post',
    data: data
  })
}

/*文件解析*/
export function handleAnlysis(sourcePdfPath) {
  return request({
    url: '/system/file/tqPdfDataToTxt' + sourcePdfPath,
    method: 'get',
    responseType: 'blob'
  })
}

/*导出*/
export function handleAnlysis1(data) {
  return request({
    url: '/system/resume/export' + data,
    method: 'get',
    data: data
  })
}


/*查询名称是否重复*/
export function getResumeName(query) {
  return request({
    url: '/system/resume/getResumeName',
    method: 'post',
    data: query
  })
}


/*查询该岗位是否投递*/
export function getAudit(ids, stationId) {
  return request({
    url: '/system/resume/getAudit/' + ids + '/' + stationId,
    method: 'get'
  })
}

